package view;

import javax.swing.Box;
import server.FirewallSession;
import server.RulesTableType;

public class RulesStandartFrame extends AbstractRulesFrame
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -9054477174649758834L;

	public RulesStandartFrame(FirewallSession ui) {
		super(ui);
	}

	/* Current shown window */	
	public static RulesStandartFrame currentRulesStandartFrame = null;

	public static RulesStandartFrame getInctance(FirewallSession ui)
	{
		if(currentRulesStandartFrame == null)
		{
			currentRulesStandartFrame = new RulesStandartFrame(ui);
		}
		
		return currentRulesStandartFrame;
	}

	/**
	 * The relevant help calling
	 */
	protected void rulesHelp()
	{
		HelpFrame.currentHelpFrame.ShowDesc(Globals.RULES);	
	}

	/**
	 * No buttons for standart user.
	 */
	protected Box getUpRulesButtons() 
	{
		return null;
	}
	
	/**
	 * No buttons for standart user.
	 */
	protected Box getDownRulesButtons()
	{
		return null;
	}
	
	/**
	 * @param table in/out type
	 * @return table of rules
	 */
	protected AbstractRulesTable getTable(RulesTableType type)
	{
		return new RulesStandartTable(type, UI);
	}

}
